package com.zxx.admin.config.auth.security;//package com.zxx.config.auth.security;
//
//import cn.hutool.json.JSONObject;
//import org.springframework.security.core.AuthenticationException;
//import org.springframework.security.web.AuthenticationEntryPoint;
//import org.springframework.stereotype.Component;
//
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//import java.io.Serializable;
//import java.util.HashMap;
//import java.util.Map;
//
//
//@Component
//public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint, Serializable {
//
//    private static final long serialVersionUID = -8970718410437077606L;
//
//    @Override
//    public void commence(HttpServletRequest request,
//                         HttpServletResponse response,
//                         AuthenticationException authException) throws IOException {
//
//
//
////        response.setStatus(ECode.SUCCESS);
////        response.setCharacterEncoding("UTF-8");
////        response.setContentType("application/json; charset=utf-8");
////        Map<String, Object> result = new HashMap<>();
////        result.put("code", ECode.UNAUTHORIZED);
////        result.put("data", "token无效或过期");
//        response.getWriter().write("OK");
//
////
//    }
//}
//
